"""
所有页面父类
定义driver
"""
from appium.webdriver.webdriver import WebDriver
class BasePage:
    def __init__(self,driver:WebDriver):
        self.driver = driver
        self.driver.implicitly_wait(6)

    def get_toast_text(self):
        toast_xpath = '//android.widget.Toast'
        return self.driver.find_element_by_xpath(toast_xpath).text